<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"  %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="pages"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<s:set var="sessTimeOut" value="#attr.generalOptions.sessionTimeOut" />

<%
	session.setMaxInactiveInterval(Integer.parseInt(pageContext.getAttribute("sessTimeOut").toString()));
%>

<s:set var="text" value="%{#attr.text}" />
<s:if test="%{#attr.text == null}">
	<s:set var="text" value="rtl" />
</s:if>

<s:set var="alignleft" value="%{#attr.alignleft}" />
<s:if test="%{#attr.alignleft == null}">
	<s:set var="alignleft" value="left" />
</s:if>

<s:set var="alignright" value="%{#attr.alignright}" />
<s:if test="%{#attr.alignright == null}">
	<s:set var="alignright" value="right" />
</s:if>

<html xmlns="http://www.w3.org/1999/xhtml" dir="${text}">

	<head>
		<title><s:property value="#attr.configuration.defaultMetaTitle" /> <decorator:title /></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="Content-Language" content="en,fr,ar" />
		<meta name="description" content="<s:property value="#attr.configuration.defaultMetaDescription" />" />
		<meta name="keywords" content="<s:property value="#attr.configuration.defaultMetaKeywords" />" />

		<link rel="shortcut icon" href="images/images.jpg" />
		<link rel="stylesheet" href="css/ColorPicker.css" type="text/css"></link>

		<script type="text/javascript" src="js/quickmenu.js"></script>
		<script type="text/javascript" src="js/common.js"></script>
		<script type="text/javascript" src="js/ddm.js"></script>
		<script type="text/javascript" src="js/jquery-1.2.3.js"></script>
		<script type="text/javascript" src="js/main.js"></script>
		<script type="text/javascript" src="js/ColorPicker.js"></script>
		<script type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>

		<decorator:head />

	</head>

    <body dir="${text}">
    <s:set var="languageforcss" value="%{#attr.languageforcss" />

    <s:if test="%{#attr.languageforcss !=null }">
    	<s:if test="%{logo != 'top'}">
    		<link rel="stylesheet" type="text/css" href="css/<s:property value="%{logo}" />/${languageforcss.chromeCss}" />
    	</s:if>
    	<s:else>
    		<link rel="stylesheet" type="text/css" href="css/${languageforcss.chromeCss}" />
    	</s:else>
    </s:if>
    <s:else>
    	<s:if test="%{logo != 'top'}">
    		<link rel="stylesheet" type="text/css" href="css/<s:property value="%{logo}" />/chromestyle.css" />
    	</s:if>
    	<s:else>
    		<link rel="stylesheet" type="text/css" href="css/chromestyle.css" />
    	</s:else>
    </s:else>
    <s:if test="%{#attr.text !=null && (#attr.text=='rtl' || #attr.text=='RTL')}">
    	<link href="css/styler.css" rel="stylesheet" type="text/css" />
    </s:if>
    <s:if test="%{#attr.text !=null && (#attr.text=='ltr' || #attr.text=='LTR')}">
    	<s:if test="%{logo != 'top'}">
    		<link href="css/<s:property value="%{logo}" />/style.css" rel="stylesheet" type="text/css" />
    	</s:if>
    	<s:else>
    		<link href="css/style.css" rel="stylesheet" type="text/css" />
    	</s:else>
    </s:if>
    <% if(session.getAttribute("WW_TRANS_I18N_LOCALE") == null){ %>
		<link href="css/style.css" rel="stylesheet" type="text/css" />
     <% } %>
    <% if(session.getAttribute("WW_TRANS_I18N_LOCALE") != null && (session.getAttribute("WW_TRANS_I18N_LOCALE").toString().equals("ru") || session.getAttribute("WW_TRANS_I18N_LOCALE").toString().equals("zh") || session.getAttribute("WW_TRANS_I18N_LOCALE").toString().equals("de") || session.getAttribute("WW_TRANS_I18N_LOCALE").toString().equals("hi"))) { %>
		<link href="css/hindistyle.css" rel="stylesheet" type="text/css" />
		<link href="css/chromestyle-russian.css" rel="stylesheet" type="text/css" />
	<% } %>
	<s:if test="#attr.languageforcss.themeId.floderName != null">
		<s:set name="themeName" value="#attr.languageforcss.themeId.floderName"></s:set>
	</s:if>

		<s:set name="left" var="left" value="1" />
        <s:set name="right" var="right" value="1" />

        <s:if test="%{leftAllowed != null && leftAllowed == false}">
        	<s:set var="left" value="0" />
		</s:if>

        <s:if test="%{rightAllowed != null && rightAllowed == false}">
        	<s:set var="right" value="0" />
		</s:if>

       	<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td valign="top">
					<s:if test="%{#attr.themeName == 'front'}">
						<%@ include file="/panels/front-header.jsp" %>
					</s:if>
					<s:else>
						<s:include value="/panels/%{#attr.themeName}/front-header.jsp"></s:include>
					</s:else>
				</td>
            </tr>
			<tr>
				<td valign="top">
					<div style="margin:11px 20px 17px 20px">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
                            <s:if test="%{#left == 1}">
                                <td width="223" valign="top">
                                <div>
                                 <s:if test="%{loginPage != null && loginPage == true}">
                                 	<s:if test="%{#attr.themeName == 'front'}">
										<%@ include file="/panels/front-login-left.jsp" %>
									</s:if>
									<s:else>
										<s:include value="/panels/%{#attr.themeName}/front-login-left.jsp"></s:include>
									</s:else>
                                </s:if>
								<s:elseif test="%{categories != null}">
									<s:if test="%{#attr.themeName == 'front'}">
										<s:include value="/panels/front-sub-categories.jsp" />
									</s:if>
									<s:else>
										<s:include value="/panels/%{#attr.themeName}/front-sub-categories.jsp"></s:include>
									</s:else>
                                </s:elseif>
                                <s:elseif test="%{showItem != null}">
                                	<s:if test="%{#attr.themeName == 'front'}">
                                		<s:include value="/panels/front-buyer-resource.jsp" />
                                		<s:include value="/panels/front-cross-promotion-items.jsp" />
									</s:if>
									<s:else>
										<s:include value="/panels/%{#attr.themeName}/front-buyer-resource.jsp"></s:include>
										<s:include value="/panels/%{#attr.themeName}/front-cross-promotion-items.jsp"></s:include>
									</s:else>
                                </s:elseif>
								<s:elseif test="%{messaging != null}">
									<s:if test="%{#attr.themeName == 'front'}">
										<%@ include file="/panels/front-messaging.jsp" %>
									</s:if>
									<s:else>
										<s:include value="/panels/%{#attr.themeName}/front-messaging.jsp"></s:include>
									</s:else>
                                </s:elseif>
                                <s:elseif test="%{#session.user == null || myAccount == null}">
                                	<s:if test="%{#attr.themeName == 'front'}">
										<%@ include file="/panels/front-left.jsp" %>
									</s:if>
									<s:else>
										<s:include value="/panels/%{#attr.themeName}/front-left.jsp"></s:include>
									</s:else>
                                </s:elseif>
                                <s:else>
                                	<s:if test="%{#attr.themeName == 'front'}">
										<%@ include file="/panels/front-user-left.jsp" %>
	                                	<%@ include file="/panels/NutchSearch.jsp" %>
	                                	<%@ include file="/panels/front-googleads.jsp" %>
									</s:if>
									<s:else>
										<s:include value="/panels/%{#attr.themeName}/front-user-left.jsp"></s:include>
										<s:include value="/panels/%{#attr.themeName}/NutchSearch.jsp"></s:include>
										<s:include value="/panels/%{#attr.themeName}/front-googleads.jsp"></s:include>
									</s:else>
                                </s:else>
                                </div>
                                </td>
                            </s:if>
                            	<td valign="top">
	                            	<div style="margin:0px 17px 0px 17px">
	                                	<decorator:body />
									</div>
	                            </td>
                            <s:if test="%{#right == 1}">
	                            <td width="211" valign="top">
	                            	<div style="margin:0px 0px 0px 0px">
	                            		<s:if test="%{#attr.themeName == 'front'}">
	                            			<s:include value="/panels/front-right.jsp" />
										</s:if>
										<s:else>
											<s:include value="/panels/%{#attr.themeName}/front-right.jsp"></s:include>
										</s:else>
	                                </div>
	                            </td>
                            </s:if>
                            </tr>
                       	</table>
					</div>
				</td>
			</tr>
            <tr>
            	<td>&nbsp;
            	<s:if test="%{#attr.themeName == 'front'}">
					<%@ include file="/panels/front-footer.jsp" %>
				</s:if>
				<s:else>
					<s:include value="/panels/%{#attr.themeName}/front-footer.jsp"></s:include>
				</s:else>
				</td>
			</tr>
		</table>
		<ajax:enable/>
	</body>
</html>
